package com.tong.cloud.example.mybatis.controller;

import com.tong.cloud.example.mybatis.repository.user.mapper.UserInfoMapper;
import com.tong.cloud.example.mybatis.repository.user.po.UserInfo;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@AllArgsConstructor
@Api(tags = {"哈喽"})
@RequestMapping("hello")
@RestController
public class HelloController {
    private final UserInfoMapper userInfoMapper;

    @GetMapping("info")
    public UserInfo info(@RequestParam("id") Long id) {
        return this.userInfoMapper.selectByPrimaryKey(id);
    }
}
